/**
 * @author Linrui
 * @since 2011-05-01
 * 统计站点访问量的拦截器
 */
package com.qeado.util.interceptors;

import javax.servlet.http.HttpServletRequest;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts2.ServletActionContext;
import org.springframework.stereotype.Component;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;

public class VisitorCountInterceptor extends AbstractInterceptor {

	private static final long serialVersionUID = 1L;
	private static final Log logger = LogFactory.getLog(VisitorCountInterceptor.class);
	
	@Override
	public String intercept(ActionInvocation arg0) throws Exception {

		HttpServletRequest request = ServletActionContext.getRequest();
		String uri = request.getServletPath();
		logger.debug(uri);
		logger.debug("VistorCount interceptor start......");
		
		if (uri.indexOf("index") != 0) { // 前台访问，统计访客量
			
		}

		
		return null;
	}

}
